package com.xhtt.modules.inspection.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 巡检标签
 * </p>
 *
 * @author xj
 * @since 2019-01-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class InsLabel extends Model<InsLabel> {

    private static final long serialVersionUID = 1L;

    public static final String LABEL_CODE = "*标签编码";

    public static final String LABEL_NAME = "*标签名称";

    public static final String LABEL_DESCRIBE = "标签描述";

    public static final String LABEL_POS_DESCRIBE = "具体位置描述";

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 标签编码
     */
    private String code;

    /**
     * 标签名称
     */
    private String name;

    /**
     * 标签描述
     */
    private String descript;

    private String posX;

    private String posY;

    /**
     * 位置描述
     */
    private String posDescript;

    /**
     * 1正常
     */
    private Integer status;

    /**
     * 备注
     */
    private String memo;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 最后一次调整时间
     */
    @TableField(update = "now()")
    private LocalDateTime updateTime;

    /**
     * 创建者ID，人工系统创建为0
     */
    private Integer createUserId;

    /**
     * 最后一次调整者ID
     */
    private Integer updateUserId;

    /**
     * 绑定检测点设备/检查项名称
     * 多个是用逗号隔开的
     */
    @TableField(exist = false)
    private String deviceName;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
